package com.techstar.ats.dxp;

import java.io.Serializable;
import java.time.format.DateTimeFormatter;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;
import com.techstar.ats.type.Enumerated;

public interface CsvFormatter extends Serializable {
	String DATE_PATTERN = "yyyy-MM-dd";
	String TIME_PATTERN = "HH:mm:ss";
	String DATE_TIME_PATTERN = DATE_PATTERN + ' ' + TIME_PATTERN;
	DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(DATE_TIME_PATTERN);

	default String toSetString(Set<? extends Enumerated> enums) {
		return StringUtils.join(enums, '|');
	}

	default String toSetStatusString(Set<? extends Enumerated> enums) {
		return StringUtils.join(enums, '|');
	}

	boolean toCsvString(StringBuffer sb);
}
